{% set distro_requires %}
  <distro_family op="=" value="RedHatEnterpriseLinux6"/>
  <distro_variant op="=" value="Server"/>
  <distro_name op="=" value="RHEL-6.10"/>
{% endset %}
{%- set PULP0_REPO -%}
https://rhsm-pulp.corp.redhat.com/content/els/rhel/server/6/6Server/{{ ARCH }}/os
{%- endset -%}
{%- set PULP1_REPO -%}
https://rhsm-pulp.corp.redhat.com/content/els/rhel/server/6/6Server/{{ ARCH }}/optional/os
{%- endset -%}
{% if ARCH == "s390x" %}
  {% set PULP0_REPO = "https://rhsm-pulp.corp.redhat.com/content/els/rhel/system-z/6/6Server/s390x/os" %}
  {% set PULP1_REPO = "https://rhsm-pulp.corp.redhat.com/content/els/rhel/system-z/6/6Server/s390x/optional/os" %}
{% endif %}
{% set ks_append | unindent %}
  <ks_append><![CDATA[
  %post
  # Enable Buildroot for test dependencies
  cat >/etc/yum.repos.d/pulp0.repo <<EOF
  [pulp0]
  name=pulp0
  baseurl={{ PULP0_REPO }}
  enabled=1
  gpgcheck=0
  skip_if_unavailable=1
  EOF
  cat >/etc/yum.repos.d/pulp1.repo <<EOF
  [pulp1]
  name=pulp1
  baseurl={{ PULP1_REPO }}
  enabled=1
  gpgcheck=0
  skip_if_unavailable=1
  EOF
  %end
  ]]></ks_append>
{% endset %}
{% set host_requires %}
  {# NOTE(bgoncalv): For i386 only uses systems that also supports x86_64 #}
  {# More details: https://gitlab.com/redhat/centos-stream/tests/kernel/kpet-db/-/merge_requests/178#note_504036929 #}
  {% if ARCH == "i386" %}
    <and>
      <system>
        <arch op="=" value="i386"/>
        <arch op="=" value="x86_64"/>
        <compatible_with_distro arch="i386" osmajor="RedHatEnterpriseLinux6"/>
      </system>
    </and>
  {% endif %}
{% endset %}
